package com.simplegovern.setting.dao;

import java.util.List;

import com.simpleframe.persistence.hibernate.Finder;
import com.simpleframe.persistence.hibernate.HibernateGenericDao;
import com.simpleframe.persistence.hibernate.OrderBy;
import com.simplegovern.setting.Setting;

public class SettingDAO extends HibernateGenericDao<Setting, Long>{

	public List<Setting> getSettingList(Long groupId){
		Finder finder = Finder.create(Setting.class);
		finder.andEq("group", groupId);
		finder.addOrder(OrderBy.desc("sort"));
		return findByFinder(finder);
	}
}
